package com.kkks.spring_rest.tick.model;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToOne;

/**
 * AbstractWhoUserAddress entity provides the base persistence definition of the
 * WhoUserAddress entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractWhoUserAddress implements java.io.Serializable {

	// Fields

	private Integer addressId;
	private Integer userId;
	private String consignee;
	private String email;
	private Short country;
	private Short province;
	private Short city;
	private Short district;
	private String address;
	private String zipcode;
	private String mobile;
	private String stateAddress;
	private String cityAddress;
	private String tel;

	/*
	 * 在EJB3规范中多对一这端几乎总是双向关联中的主体(owner)端
	 */
	
	private WhoUsers whoUsers;
	
	
	// Constructors
//	@OneToOne(mappedBy = "whoUserAddresses")
//	public WhoUsers getWhoUsers() {
//		return whoUsers;
//	}
//
//	public void setWhoUsers(WhoUsers whoUsers) {
//		this.whoUsers = whoUsers;
//	}

	/** default constructor */
	public AbstractWhoUserAddress() {
	}

	/** full constructor */
	public AbstractWhoUserAddress(Integer userId, String consignee,
			String email, Short country, Short province, Short city,
			Short district, String address, String zipcode, String mobile,
			String stateAddress, String cityAddress, String tel) {
		this.userId = userId;
		this.consignee = consignee;
		this.email = email;
		this.country = country;
		this.province = province;
		this.city = city;
		this.district = district;
		this.address = address;
		this.zipcode = zipcode;
		this.mobile = mobile;
		this.stateAddress = stateAddress;
		this.cityAddress = cityAddress;
		this.tel = tel;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "address_id", unique = true, nullable = false)
	public Integer getAddressId() {
		return this.addressId;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "consignee", nullable = false, length = 60)
	public String getConsignee() {
		return this.consignee;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}

	@Column(name = "email", nullable = false, length = 60)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "country", nullable = false)
	public Short getCountry() {
		return this.country;
	}

	public void setCountry(Short country) {
		this.country = country;
	}

	@Column(name = "province", nullable = false)
	public Short getProvince() {
		return this.province;
	}

	public void setProvince(Short province) {
		this.province = province;
	}

	@Column(name = "city", nullable = false)
	public Short getCity() {
		return this.city;
	}

	public void setCity(Short city) {
		this.city = city;
	}

	@Column(name = "district", nullable = false)
	public Short getDistrict() {
		return this.district;
	}

	public void setDistrict(Short district) {
		this.district = district;
	}

	@Column(name = "address", nullable = false, length = 120)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "zipcode", nullable = false, length = 60)
	public String getZipcode() {
		return this.zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	@Column(name = "mobile", nullable = false, length = 60)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "state_address", nullable = false, length = 60)
	public String getStateAddress() {
		return this.stateAddress;
	}

	public void setStateAddress(String stateAddress) {
		this.stateAddress = stateAddress;
	}

	@Column(name = "city_address", nullable = false, length = 60)
	public String getCityAddress() {
		return this.cityAddress;
	}

	public void setCityAddress(String cityAddress) {
		this.cityAddress = cityAddress;
	}

	@Column(name = "tel", nullable = false, length = 60)
	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

}